//
//  YKStateMachineProtrocol.h
//  YK_BaseTools
//
//  Created by edward on 2021/9/30.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol YKStateMachineContainerProtrocol <NSObject>

/// 返回子状态
- (NSArray *)childState;

/// 获取供子类使用的容器
- (UIView *)getContainerView;

@optional
// 加载viewModel
- (NSDictionary *)getCustomUserInfo;


@end

@protocol YKStateMachineProtrocol <NSObject>

@required
/// 当状态机进入本状态时回调
/// @param previousState 上一个状态
- (void)didEnterWithPreviousState:(NSString *)previousState container:(id<YKStateMachineContainerProtrocol>)container;


/// 当状态机将要离开本状态时回调
/// @param nextState 下一个状态
- (void)willExitWithNextState:(NSString *)nextState;

@end

NS_ASSUME_NONNULL_END
